home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / ToolTip Cl19102522001.psc / Form2.frm (.txt) next >
Encoding:
Visual Basic Form  |  2001-04-30  |  2.0 KB  |  62 lines

  1. VERSION 5.00
  2. Begin VB.Form Form2 
  3.    Caption         =   "Tooltip Demo"
  4.    ClientHeight    =   1530
  5.    ClientLeft      =   45
  6.    ClientTop       =   330
  7.    ClientWidth     =   4545
  8.    LinkTopic       =   "Form2"
  9.    ScaleHeight     =   1530
  10.    ScaleWidth      =   4545
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command3 
  13.       Caption         =   "Command3"
  14.       Height          =   612
  15.       Left            =   3000
  16.       TabIndex        =   2
  17.       Top             =   360
  18.       Width           =   1092
  19.    End
  20.    Begin VB.CommandButton Command2 
  21.       Caption         =   "Command2"
  22.       Height          =   612
  23.       Left            =   1680
  24.       TabIndex        =   1
  25.       Top             =   360
  26.       Width           =   1092
  27.    End
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "Command1"
  30.       Height          =   612
  31.       Left            =   360
  32.       TabIndex        =   0
  33.       Top             =   360
  34.       Width           =   1092
  35.    End
  36. Attribute VB_Name = "Form2"
  37. Attribute VB_GlobalNameSpace = False
  38. Attribute VB_Creatable = False
  39. Attribute VB_PredeclaredId = True
  40. Attribute VB_Exposed = False
  41. Private Sub Command1_Click()
  42. End Sub
  43. Private Sub Form_Load()
  44.     Dim str(1 To 3) As String
  45.     Dim ToolTipFactory As New clsToolTipFactory
  46.     str(1) = "This is the first button's tooltip."
  47.     str(2) = "And now we" & vbNewLine & " have a multi-line tooltip" & _
  48.         vbNewLine & "that is very long and very neat!"
  49.     str(3) = "And of course, each project's tooltips can " & vbNewLine & _
  50.         "each be a different color entirely or all the same color"
  51.         
  52.     With ToolTipFactory
  53.         .AssignToolTip Command1, str(1)
  54.         .ForeColor = vbWhite
  55.         .AssignToolTip Command2, str(2)
  56.         .ForeColor = vbWhite
  57.         .BackColor = vbRed
  58.         .AssignToolTip Command3, str(3)
  59.     End With
  60.     Set ToolTipFactory = Nothing
  61. End Sub
  62.